trigger SavingCopyOfPhoneFieldsOnLead on Lead (before Insert,before Update) {

    for(Lead A : Trigger.New)
    {
        String str = A.Home_Phone__c;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Home_Phone__c = str;
        }   
        
        str = A.MobilePhone;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Mobile_Phone__c = str;
        }   
        
        str = A.Work_Phone__c;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Work_Phone__c = str;
        }   
        
        str = A.Marketing_Phone__c;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Marketing_Phone__c = str;
        }   
        
        str = A.Other_Phone__c;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Other_Phone__c = str;
        }   
        
        str = A.Other_Phone_2__c;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Other_Phone_2__c= str;
        }   
        
        str = A.Mother_s_Phone_Number__c;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Mother_s_Phone__c= str;
        }   
        
        str = A.Father_s_Phone_Number__c;
        if(str != null && str !='')
        {
            str = str.replaceAll('[^0-9]','');
            A.Copy_Father_s_Phone__c = str;
        }   
        
     }
}